Version 1/060801 of Simple Clothing by Sir Gareth begins here.

[Parts of this library are modeled after examples by Emily Short and Shadow Wolf]

Volume 1 - clothing

Part 1.1 - Kinds

A body-area is a kind of thing.

A layered is a kind of thing.  A layered has a number called layer-number.  The layer-number of a layered is usually 2.

Clothing is a kind of layered.  The layer-number of a clothing is usually 2.  Clothing is usually wearable.  Clothing can be open or closed.  Clothing is usually closed.

A body-part is a kind of layered.  The layer-number of a body-part is usually 0.  A body-part is usually fixed in place.


Part 1.2 - Relationships

Overlying relates various layereds to various body-areas.  The verb to overlie (it overlies, they overlie, it is overlying, it is overlaid) implies the overlying relation.

Obstructing relates a clothing (called A) to a clothing (called B) when A covers B.  The verb to obstruct (it obstructs, they obstruct, it is obstructing, it is obstructed) implies the obstructing relation.

Hiding relates a clothing (called A) to a layered (called B) when A allhides B.  The verb to hide (it hides, they hide, it is hiding, it is hidden) implies the hiding relation.

To decide if (upper - a clothing) covers (lower - a layered):
   If the upper is the lower, no;
   If the layer-number of upper is less than the layer-number of lower, no;
   If upper overlies a body-area that is overlaid by lower, yes;
   otherwise no.  

To decide if (upper - a clothing) allhides (lower - a layered):
   Let wearer be the holder of the lower;
   If upper is open, no;
   If upper is not worn by the wearer, no;
   If upper covers lower, yes;
   otherwise no.

Outcovering relates a clothing (called A) to a body-part (called B) when A is the outer cover of B.  The verb to outcover (it outcovers, they outcover, it is outcovering, it is outcovered) implies the outcovering relation.

To decide if (upper - a clothing) is the outer cover of (lower - a body-part):
   If the upper is hidden by a clothing, no;
   If the upper hides the lower, yes;
   otherwise no.

To say the cover of (A - a body-part):
   If a clothing (called B) outcovers A, say "[the B]";
   otherwise say "nothing".

Part 1.3 - Inventory

Definition:  A thing is unconcealed:
   Let the wearer be the holder of it;
   If it is not a clothing, yes;
   If it is not worn by the wearer, yes;
   If it is hidden by a clothing, no;
   otherwise yes.

Instead of taking inventory:
  Say "[If the player wears something]You're wearing [list of unconcealed things worn by the player].  [end if]You are carrying [list of things carried by the player]."

Part 1.4 - Verbs

Clothing has a property called put on message.  The put on message of clothing is usually "You put on [the noun]."

Clothing has a property called take off message.  The take off message of clothing is usually "You take off [the noun]."

Clothing has a property called someone put on message.  The someone put on message of clothing is usually "[The person asked] puts on [the noun]."

Clothing has a property called someone take off message.  The someone take off message of clothing is usually "[The person asked] takes off [the noun]."

Understand "remove [clothing]" as taking off

Check taking off clothing:
  Let the wearer be the holder of the noun;
  If the noun is obstructed by something (called the impediment) which is worn by the wearer, say "[The impediment] is in the way." instead.

Check someone trying taking off clothing (this is the can't take off clothing through clothing rule):
  Let the wearer be the holder of the noun;
  If the noun is obstructed by something (called the impediment) which is worn by the wearer, say "[The impediment] is in the way. " instead.

A procedural rule:  Ignore the standard report taking off rule.

Report taking off:
   If the noun is clothing, say the take off message of the noun;
   Otherwise say "You take off [the noun]."

Report someone trying taking off:
   If the noun is clothing, say the someone take off message of the noun;
   Otherwise say "[The person asked] takes off [the noun]."

[If a person does not have the item they're being asked to wear, try taking it unless another person is wearing it]
Before someone trying wearing something that is not enclosed by the person asked:
  If the noun is worn by a person (called P) begin;
    Say "Someone else is already wearing [the noun].";
    Stop the action;
  Otherwise;
    Say "(first taking [the noun])[line break]";
    Silently try the person asked trying taking the noun;
  End if.

Check wearing clothing:
  If the noun is obstructed by something (called the impediment) which is worn by the player, say "[The impediment] is in the way." instead.

Check someone trying wearing clothing (this is the can't wear clothing through clothing rule):
  If the noun is obstructed by something (called the impediment) which is worn by the person asked, say "[The impediment] is in the way. " instead.

A procedural rule:  Ignore the standard report wearing rule.

Report wearing:
   If the noun is clothing, say the put on message of the noun;
   Otherwise say "You put on [the noun]."

Report someone trying wearing:
   If the noun is clothing, say the someone put on message of the noun;
   Otherwise say "[The person asked] puts on [the noun]."

Instead of looking under something which is worn by someone:
  say "You need to take off [the noun] to see what's under it."

Part 1.4.5 -  Clothing sizes

Clothing has a number called size.  The size of a clothing is usually 10.

A person has a number called size.  The size of a person is usually 10.

Check wearing clothing:
  If the size of the noun is less than the size of the player, say "[The noun] is too small for you." instead

Check wearing clothing:
  If the size of the noun is greater than the size of the player, say "[The noun] is too big for you." instead

Check someone trying wearing clothing (this is the can't wear clothing that is too small rule):
  If the size of the noun is less than the size of the person asked, say "[The noun] is too small for [the person asked]." instead

Check someone trying wearing clothing (this is the can't wear clothing that is too big rule):
  If the size of the noun is greater than the size of the person asked, say "[The noun] is too big for [the person asked]." instead

Part 1.5 - Descriptions of clothing

The description of clothing is usually "[if the noun is worn by someone] [worn description of the noun][end if][if the noun is not worn by someone][unworn description of the noun] [end if]" [otherwise isn't working here for some reason]

Clothing has a property called worn description.  The worn description is usually "[The holder of the item described] is wearing [the item described]."

Clothing has a property called unworn description.  The unworn description is usually "You see nothing special about [the item described]."

[Clothing has a property called worn-on-actor description.]

Part 1.6 - Clothing ownership and fast strippage

[Clothing ownership if used for two purposes:
(1)  A person can quickly put on all of the clothing that he owns, and
(2)  A person is prohibited from going out in public without wearing all of the clothing that he owns]

Clothing-ownership relates one person (called the clothing-owner) to various clothing.  The verb to clothing-own (it clothing-owns, they clothing-own, it is clothing-owning, it is clothing-owned) implies the clothing-ownership relation.

Stripping is an action applying to nothing.  Understand "strip" and "get undressed" and "undress" as stripping.

Check stripping:
  If the player is not wearing anything, say "But you're not wearing anything!" instead.

Carry out stripping:
  Quick-strip the player.

Report stripping:
  Say "You take off all of your clothes."

To quick-strip (strippee - a person):
  Repeat with item running through clothing worn by the strippee begin;
    Move the item to the holder of the strippee;
  end repeat.

Dressing is an action applying to nothing.  Understand "get dressed" and "dress" as dressing.

Check dressing:
  If the player does not clothing-own anything, say "I'm not sure what you want to wear." instead.

Carry out dressing:
  Quick-dress the player.

Report dressing:
  Say "You put on [list of clothing clothing-owned by the player]."

To quick-dress (dressee - a person):
  Repeat with item running through clothing clothing-owned by the dressee begin;
    Now the dressee is wearing the item;
  end repeat.

Part 1.7 - Descriptions of body-parts

The description of a body-part is usually "[If the noun is outcovered by a clothing][Covered description of the noun][end if][If the noun is not outcovered by a clothing][Uncovered description of the noun][end if]"

A body-part has a property called covered description.  The covered description is usually "[The item described] is concealed beneath [the cover of the item described]."

 A body-part has a property called uncovered description.  The uncovered description is usually "Ogling [the item described] would be less than polite."

Part 1.9 - generic-clothing and body-parts

Section 1.9.1 - body-areas
 
The chest-area is a body-area.  
The crotch-area is a body-area.  
The ass-area is a body-area.  
The legs-area is a body-area.  

Section 1.9.2 - generic-clothing

A shirtlike is a kind of clothing.
A stockinglike is a kind of clothing.
A shortslike is a kind of clothing.
A thonglike is a kind of clothing.
A pantslike is a kind of clothing.
A minilike is a kind of clothing.
A suitlike is a kind of clothing.

A generic-undershirt is a kind of shirtlike.  The layer-number of a generic-undershirt is 2.

A generic-underwear is a kind of shortslike.  The layer-number of generic-underwear is 2.

A generic-stockings is a kind of stockinglike.  The layer-number of generic-stockings is 2.

A generic-thong is a kind of thonglike.  The layer-number of generic-thong is 2.

A generic-shirt is a kind of shirtlike.  The layer-number of a generic-shirt is 3.

A generic-shorts is a kind of shortslike.  The layer-number of generic-shorts is 3.

A generic-pants is a kind of pantslike.  The layer-number of generic-pants is 3.

A generic-minidress is a kind of minilike.  The layer-number of generic-minidress is 4.

A generic-overshirt is a kind of shirtlike.  The layer-number of a generic-overshirt is 4.

A generic-jacket is a kind of shirtlike.  The layer-number of a generic-jacket is 4.  A generic-jacket is usually open.

A generic-suit is a kind of suitlike.  The layer-number of a generic-suit is 4.


Section 1.9.3 - Overlying relationships

When play begins:
  Now every stockinglike overlies the legs-area;
  Now every shirtlike overlies the chest-area;
  Now every thonglike overlies the crotch-area;
  Now every shortslike overlies the ass-area;
  Now every shortslike overlies the crotch-area;
  Now every pantslike overlies the ass-area;
  Now every pantslike overlies the crotch-area;
  Now every pantslike overlies the legs-area;
  Now every suitlike overlies the ass-area;
  Now every suitlike overlies the crotch-area;
  Now every suitlike overlies the legs-area;
  Now every suitlike overlies the chest-area;
  Now every minilike overlies the ass-area;
  Now every minilike overlies the crotch-area;
  Now every minilike overlies the chest-area.

Simple Clothing ends here.

---- DOCUMENTATION ----

This extension implements layered clothing for the player and NPCs.  It is intended to be used with the Simple Sex extension, but can also be used on its own.  Here is a simple example:

	Include Simple Clothing by Sir Gareth

	Dressing Room is a room.

	The player is wearing some boxer shorts, some blue jeans, an oxford shirt, and a red sweater.  The description is "You are wearing [list of unconcealed things worn by the player]."  The boxer shorts are generic-underwear.  The blue jeans are generic-pants.  The oxford shirt is a generic-shirt.  The red sweater is a generic-overshirt.

	Jane is a woman in the Dressing Room.  The size is 8.  The description is "Jane is wearing [list of unconcealed things worn by Jane]."

	Jane is wearing a bra, some panties, and a little black dress.  The bra is a generic-undershirt.  The size of the bra is 8.  The panties are generic-underwear.  The size of the panties is 8.  The little black dress is a generic-minidress.  The size of the little black dress is 8.

	Persuasion rule for asking Jane to try doing something:  Persuasion succeeds.

